<template>
    <div>
        <Header/>
        <Recommend :shopList="shopList"/>
        <Footer/>
    </div>

</template>

<script setup>
import Footer from "../components/Footer.vue";
import Header from "../components/Header.vue";
import Recommend from "../components/Recommend.vue";

import { onMounted, onUnmounted, reactive,watch,ref } from 'vue'
import {getAllIndexShopsAPI} from "../api/api.js";
import {getSessionStorage} from "../common.js";

const shopList = reactive([])

onMounted(()=>{
    getAllIndexShopsAPI(getSessionStorage("user").token).then(res=>{
        shopList.splice(0,shopList.length)
        shopList.push(...res.data.data)
    })
})





</script>




<style scoped>
</style>